package com.spring.springmvc.响应;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;

@RequestMapping("returnJson")
@Controller
@ResponseBody
public class 返回json {
    @RequestMapping("returnJson1")
    public HashMap returnJson(){
        HashMap<String,String> hashMap = new HashMap<>();
        hashMap.put("k1","v1");
        hashMap.put("k2","v2");
        hashMap.put("k3","v3");
        return hashMap;
    }
}
